<?php /*a:6:{s:54:"E:\code\jiaoyou\application\admin\view\member\add.html";i:1599882580;s:57:"E:\code\jiaoyou\application\admin\view\public\header.html";i:1598939754;s:54:"E:\code\jiaoyou\application\admin\view\public\css.html";i:1598939754;s:53:"E:\code\jiaoyou\application\admin\view\public\js.html";i:1598939754;s:57:"E:\code\jiaoyou\application\admin\view\public\footer.html";i:1598939753;s:57:"E:\code\jiaoyou\application\admin\view\public\bottom.html";i:1598939754;}*/ ?>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="renderer" content="webkit">
<meta http-equiv="Cache-Control" content="no-siteapp" />
<title>后台系统</title>
<!--[if lt IE 9]>
<meta http-equiv="refresh" content="0;ie.html" />
<![endif]-->
<link rel="stylesheet" type="text/css" href="http://jiaoyou.com\/style/admin/css/bootstrap.min.css" />
<link rel="stylesheet" type="text/css" href="http://jiaoyou.com\/style/admin/css/font-awesome.min.css" />
<link rel="stylesheet" type="text/css" href="http://jiaoyou.com\/style/admin/css/animate.min.css" />
<link rel="stylesheet" type="text/css" href="http://jiaoyou.com\/style/admin/css/style.min.css" />
<link rel="stylesheet" type="text/css" href="http://jiaoyou.com\/style/admin/css/ffxiang.css" />
<link rel="shortcut icon" href="http://jiaoyou.com\/style/admin/img/favicon.ico">
    <script type="text/javascript" src="http://jiaoyou.com\/style/admin/js/jquery.min.js"></script>
<script type="text/javascript" src="http://jiaoyou.com\/style/admin/js/bootstrap.min.js"></script>
    <script type="text/javascript" src="http://jiaoyou.com\/style/layui/layui.js"></script>
    <link rel="stylesheet" type="text/css" href="http://jiaoyou.com\/style/layui/css/layui.css" />
</head>
<style type="text/css">.gray-bg{ background: #fff; } .wrapper{ padding:0px;}.layui-form-checkbox i{height: 30px!important;}</style>
<body class="gray-bg" id="body">
<div class="wrapper wrapper-content">
    <div class="row">
        <form class="form-horizontal" method="post">
            <div class="col-sm-12">
                <div class="ibox-content">
                    <?php if(!input('get.id')): ?>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">随机生成：</label>
                        <div class="col-sm-9"> <a class="btn btn-primary" href="<?php echo url('member/add',['random'=>-1]); ?>">随机</a>
                        </div>
                    </div>
                    <?php endif; ?>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">用户类型：</label>
                        <div class="col-sm-9">
                            <div class="radio i-checks">
                                <?php foreach($types as $type_key =>$type_value): ?>
                                <label>
                                    <input type="radio" name="type" value="<?php echo htmlentities($type_key); ?>" <?php if((isset($name['type']) && $name['type'] == $type_key) || (!isset($name['type']) && $type_key==0)): ?>checked="checked"<?php endif; ?> /> <?php echo htmlentities($type_value); ?>
                                </label>
                                <?php endforeach; ?>
                            </div>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">手机：</label>
                        <div class="col-sm-9">
                            <input name="username" type="text" class="form-control" value="<?php echo htmlentities((isset($name['username']) && ($name['username'] !== '')?$name['username']:'')); ?>" onkeyup="this.value=this.value.replace(/[^\d]/g, '')" maxlength="11" />
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-sm-2 control-label">头像：</label>
                        <div class="col-sm-9">
                            <div class="input-group">
                                <input type="text" name="avatar" id="image" value="<?php echo htmlentities((isset($name['avatar']) && ($name['avatar'] !== '')?$name['avatar']:"")); ?>" class="form-control" />
                                <span class="input-group-btn">
                                    <button type="button" class="btn btn-primary" id="upload">上传头像</button>
                                </span>
                            </div>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">常驻城市：</label>
                        <div class="col-sm-9" id="area">
                            <div class="col-sm-4">
                                <select name="province" class="form-control">
                                    <option value="0">省 [直辖市、自治 (特别行政)区]</option>
                                    <?php foreach($province as $value => $pn): ?>
                                    <option value="<?php echo htmlentities($value); ?>" <?php if(!empty($name['province']) and ($name['province'] == $value)): ?>selected="selected"<?php endif; ?>><?php echo htmlentities($pn); ?></option>
                                    <?php endforeach; ?>
                                </select>
                            </div>
                            <div class="col-sm-3" id="city" <?php if(empty($city)): ?>style="display:none;"<?php endif; ?>>
                            <select name="city" class="form-control">
                                <option value="0">市 [市(自治、行政)辖区]</option>
                                <?php foreach($city as $value => $cn): ?>
                                <option value="<?php echo htmlentities($value); ?>" <?php if(isset($name['city']) and ($name['city'] == $value)): ?>selected="selected"<?php endif; ?>><?php echo htmlentities($cn); ?></option>
                                <?php endforeach; ?>
                            </select>
                        </div>
                        <div class="col-sm-2" id="district" <?php if(empty($district)): ?>style="display:none;"<?php endif; ?>>
                        <select name="district" class="form-control">
                            <option value="0">区</option>
                            <?php foreach($district as $value => $dn): ?>
                            <option value="<?php echo htmlentities($value); ?>" <?php if(isset($name['district']) and $name['district'] == $value): ?>selected="selected"<?php endif; ?>><?php echo htmlentities($dn); ?></option>
                            <?php endforeach; ?>
                        </select>
                    </div>
                </div>
            </div>

            <div class="form-group">
                <label class="col-sm-2 control-label">经纬度：</label>
                <div class="col-sm-9"> <a class="btn btn-primary" onClick="newOpen('<?php echo url('coordinatePicking'); ?>','坐标拾取')">设置</a>
                    &nbsp; &nbsp;
                    <span id="longitude_latitude">
                                  经度：<?php echo htmlentities((isset($name['longitude']) && ($name['longitude'] !== '')?$name['longitude']:'未设置')); ?>  纬度：<?php echo htmlentities((isset($name['latitude']) && ($name['latitude'] !== '')?$name['latitude']:'未设置')); ?>
                    </span>
                </div>
            </div>
            <?php if($address): ?>
            <div class="form-group">
                <label class="col-sm-2 control-label">当前位置：</label>
                <div class="col-sm-9">
                    <span style="display: block;padding-top:5px;" id="address"><?php echo htmlentities($address); ?></span>
                </div>
            </div>
            <?php endif; ?>

                    <div class="form-group">
                        <label class="col-sm-2 control-label">昵称：</label>
                        <div class="col-sm-9">
                            <input name="nickname" type="text" class="form-control" value="<?php echo htmlentities((isset($name['nickname']) && ($name['nickname'] !== '')?$name['nickname']:'')); ?>" />
                        </div>
                    </div>


            <div class="form-group date_time">
                <label class="col-sm-2 control-label">出生日期：</label>
                <div class="col-sm-9">
                    <input type="text" name="birthday" class="layui-input" id="birthday" value="<?php echo htmlentities((isset($name['birthday']) && ($name['birthday'] !== '')?$name['birthday']:'')); ?>" >
                </div>

            </div>

            <div class="form-group">
                <label class="col-sm-2 control-label">微信号：</label>
                <div class="col-sm-9">
                    <input name="wechat" type="text" class="form-control" value="<?php echo htmlentities((isset($name['wechat']) && ($name['wechat'] !== '')?$name['wechat']:'')); ?>" />
                </div>
            </div>

            <div class="form-group">
                <label class="col-sm-2 control-label">微信隐藏：</label>
                <div class="col-sm-9">
                    <div class="radio i-checks">
                        <label>
                            <input type="radio" name="wechat_hide" value="1" <?php if(!isset($name['wechat_hide']) or $name['wechat_hide'] == 1): ?>checked="checked"<?php endif; ?> /> 是
                        </label>
                        <label>
                            <input type="radio" name="wechat_hide" value="0" <?php if(isset($name['wechat_hide']) and $name['wechat_hide'] == 0): ?>checked="checked"<?php endif; ?> /> 否
                        </label>
                    </div>
                </div>
            </div>

            <div class="form-group">
                <label class="col-sm-2 control-label">性别：</label>
                <div class="col-sm-9">
                    <?php if(!input('get.id')): ?>
                    <select name="sex" class="form-control">
                        <?php foreach($sexs as $sex=>$sex_name): ?>
                        <option value="<?php echo htmlentities($sex); ?>"  <?php if(isset($name['sex']) and $name['sex'] == $sex): ?>selected="selected"<?php else: ?><?php endif; ?>><?php echo htmlentities($sex_name); ?></option>
                        <?php endforeach; ?>
                    </select>
                    <?php else: ?>
                    <div class="form-control">
                        <input type="hidden" name="sex" value="<?php echo htmlentities($name['sex']); ?>" readonly="readonly" />
                        <?php echo htmlentities($sexs[$name['sex']]); ?>
                    </div>
                    <?php endif; ?>

                </div>
            </div>

            <div class="form-group">
                <label class="col-sm-2 control-label">是否真人：</label>
                <div class="col-sm-9">
                    <div class="radio i-checks">
                        <label>
                            <input type="radio" name="real_verify" value="1" <?php if(!isset($name['real_verify']) or $name['real_verify'] == 1): ?>checked="checked"<?php endif; ?> /> 是
                        </label>
                        <label>
                            <input type="radio" name="real_verify" value="0" <?php if(isset($name['real_verify']) and $name['real_verify'] == 0): ?>checked="checked"<?php endif; ?> /> 否
                        </label>
                    </div>
                </div>
            </div>

            <?php if(input('get.id') && $name['real_verify'] && !$name['video_verify']): ?>
            <div class="form-group">
                <label class="col-sm-2 control-label">是否女神：</label>
                <div class="col-sm-9">
                    <div class="radio i-checks">
                        <label>
                            <input  type="radio" name="video_verify" value="1" <?php if(!isset($name['video_verify']) or
                                   $name['video_verify'] == 1): ?>checked="checked" <?php endif; ?> /> 是
                        </label>
                        <label>
                            <input type="radio" name="video_verify" value="0" <?php if(isset($name['video_verify']) and
                                   $name['video_verify'] == 0): ?>checked="checked" <?php endif; ?> /> 否
                        </label>
                    </div>
                </div>
            </div>
            <?php endif; ?>



            <div class="form-group">
                <label class="col-sm-2 control-label">交友节目</label>
                <div class="col-sm-9 layui-form">
                    <?php foreach($content_type_list as $content_type): ?>
                    <input style="height: 30px;" type="checkbox"  name="content_type_list[]" <?php if($content_type['checked']): ?>checked="checked"<?php endif; ?> title="<?php echo htmlentities($content_type['name']); ?>" value="<?php echo htmlentities($content_type['name']); ?>" />
                    <?php endforeach; ?>

                </div>
            </div>

            <div class="form-group">
                <label class="col-sm-2 control-label">期望对象</label>
                <div class="col-sm-9 layui-form">
                    <?php foreach($expect_object_list as $expect_object): ?>
                    <input style="height: 30px;" type="checkbox"  name="expect_object_list[]" <?php if($expect_object['checked']): ?>checked="checked"<?php endif; ?> title="<?php echo htmlentities($expect_object['name']); ?>" value="<?php echo htmlentities($expect_object['name']); ?>" />
                    <?php endforeach; ?>

                </div>
            </div>



                    <div class="form-group">
                        <label class="col-sm-2 control-label">身高：</label>
                        <div class="col-sm-9">
                            <select name="height" class="form-control">
                                <?php $__FOR_START_1997158094__=139;$__FOR_END_1997158094__=192;for($i=$__FOR_START_1997158094__;$i < $__FOR_END_1997158094__;$i+=1){ ?>
                                <option value="<?php echo htmlentities($i); ?>" <?php if(isset($name['height']) and $name['height'] == $i): ?>selected="selected"<?php endif; ?>><?php if($i<140): ?>140cm以下<?php elseif($i>190): ?>190cm以上<?php else: ?><?php echo htmlentities($i); ?>cm<?php endif; ?></option>
                                <?php } ?>
                            </select>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">体重：</label>
                        <div class="col-sm-9">
                            <select name="weight" class="form-control">
                                <?php $__FOR_START_92708025__=39;$__FOR_END_92708025__=92;for($i=$__FOR_START_92708025__;$i < $__FOR_END_92708025__;$i+=1){ ?>
                                <option value="<?php echo htmlentities($i); ?>" <?php if(isset($name['weight']) and $name['weight'] == $i): ?>selected="selected"<?php endif; ?>><?php if($i<40): ?>40kg以下<?php elseif($i>90): ?>90kg以上<?php else: ?><?php echo htmlentities($i); ?>kg<?php endif; ?></option>
                                <?php } ?>
                            </select>
                        </div>
                    </div>


                    <div class="form-group">
                        <label class="col-sm-2 control-label">职业：</label>
                        <div class="col-sm-9">
                            <select name="profession" class="form-control">
                                <?php foreach($profession_list as $profession): ?>
                                <option value="<?php echo htmlentities($profession); ?>" <?php if(isset($name['profession']) and $name['profession'] == $profession): ?>selected="selected"<?php endif; ?>><?php echo htmlentities($profession); ?></option>
                                <?php endforeach; ?>
                            </select>
                        </div>
                    </div>







                    <div class="form-group">
                        <label class="col-sm-2 control-label">是否公司：</label>
                        <div class="col-sm-9">
                            <div class="radio i-checks">
                                <label>
                                    <input type="radio" <?php if(isset($name['is_company'])): ?>disabled="disabled"<?php endif; ?>  name="is_company" lay-filter="company" value="1" <?php if(isset($name['is_company']) and $name['is_company'] == 1): ?>checked="checked"<?php endif; ?> /> 是
                                </label>
                                <label>
                                    <input type="radio" <?php if(isset($name['is_company'])): ?>disabled="disabled"<?php endif; ?> name="is_company" lay-filter="company" value="0" <?php if(!isset($name['is_company']) or $name['is_company'] == 0): ?>checked="checked"<?php endif; ?> /> 否
                                </label>
                            </div>
                        </div>
                    </div>

                    <div class="form-group" id="invite_code" <?php if(isset($name['is_company']) && $name['is_company'] == 1): ?> style="display: none;" <?php endif; ?>>
                        <label class="col-sm-2 control-label">推荐人邀请码：</label>
                        <div class="col-sm-9">
                            <input name="recommend_invite_code"  type="text" <?php if(isset($name['recommend_invite_code']) and $name['recommend_invite_code'] != '' and !input('?get.random')): ?>readonly="readonly"<?php endif; ?>class="form-control" value="<?php echo htmlentities((isset($name['recommend_invite_code']) && ($name['recommend_invite_code'] !== '')?$name['recommend_invite_code']:'')); ?>" />
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-sm-2 control-label">状态：</label>
                        <div class="col-sm-9">
                            <div class="radio i-checks">
                                <label>
                                    <input type="radio" name="status" value="1" <?php if(!isset($name['status']) or $name['status'] == 1): ?>checked="checked"<?php endif; ?> /> 启用
                                </label>
                                <label>
                                    <input type="radio" name="status" value="0" <?php if(isset($name['status']) and $name['status'] == 0): ?>checked="checked"<?php endif; ?> /> 禁用
                                </label>
                            </div>
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-sm-2 control-label">是否合伙人：</label>
                        <div class="col-sm-9">
                            <div class="radio i-checks">
                                <label>
                                    <input type="radio" name="identity" value="0" <?php if(!isset($name['identity']) || $name['identity'] == 0): ?>checked="checked"<?php endif; ?> /> 否
                                </label>
                                <label>
                                    <input type="radio" name="identity" value="1" <?php if(isset($name['identity']) && $name['identity'] == 1): ?>checked="checked"<?php endif; ?> /> 是
                                </label>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <input type="hidden" name="id" value="<?php echo htmlentities((isset($name['id']) && ($name['id'] !== '')?$name['id']:0)); ?>" />
            <input name="longitude" id="longitude" type="hidden" class="form-control" value="<?php echo htmlentities((isset($name['longitude']) && ($name['longitude'] !== '')?$name['longitude']:'')); ?>" />
            <input name="latitude" id="latitude" type="hidden" class="form-control" value="<?php echo htmlentities((isset($name['latitude']) && ($name['latitude'] !== '')?$name['latitude']:'')); ?>" />
        </form>
    </div>
</div>
     
    <script type="text/javascript" src="http://jiaoyou.com\/style/admin/js/content.min.js"></script>
    <link rel="stylesheet" type="text/css" href="http://jiaoyou.com\/style/admin/plugins/sweetalert/sweetalert.css" />
    <script type="text/javascript" src="http://jiaoyou.com\/style/admin/plugins/sweetalert/sweetalert.min.js"></script>
    <script type="text/javascript" src="http://jiaoyou.com\/style/admin/plugins/layer/layer.js"></script>
    <script type="text/javascript" src="http://jiaoyou.com\/style/admin/js/ffxiangIndex.js"></script>
    <script type="text/javascript" src="http://jiaoyou.com\/style/admin/js/common.js"></script>
</body>
</html>
<script type="text/javascript" src="http://jiaoyou.com\/style/admin/js/area.js?ver=20200522"></script>
<script type="text/javascript" src="http://jiaoyou.com\/style/admin/plugins/iCheck/icheck.min.js"></script>
<link rel="stylesheet" type="text/css" href="http://jiaoyou.com\/style/admin/plugins/iCheck/custom.css" />
<script type="text/javascript">
$(document).ready(function(){
    $(".i-checks").iCheck({
        checkboxClass: "icheckbox_square-green",
        radioClass: "iradio_square-green",
    });
});


$("[name='is_company']").on("ifChecked",function () {
    var is_company = $(this).val();
   if(is_company==1){
        $("#invite_code").hide();
   }else{
       $("#invite_code").show();
   }
})

layui.use('laydate', function () {
    //时间选择器
    layui.laydate.render({
        elem: '#birthday'
        , type: 'date'
    });

});

layui.use('form', function(){
    var form = layui.form;
});

$("#upload").click(function(){
    layer.open({
        type: 2,
        title: '上传图片',
        shadeClose: true,
        shade: 0.2,
        area: ['70%', '60%'],
        skin:'shangchuantup',
        content: "<?php echo url('index/upload', ['type' => 'avatar']); ?>",
        shift:-1,
        scrollbar: false,
        moveType: 1,
        moveOut: true
    });
});
function newOpen(url,title){
    var height = $(window).height();
    var width = $(window).width();
    var top =  (window.screen.height-height)/2;
    var left =  (window.screen.width-width)/2;

    var address = "";
    if($("#address").length>0){
        address =$("#address").text();
    }

    if(address==""){
        console.log(123123);
        var province_obj = $("select[name='province']");
        var city_obj = $("select[name='city']");
        var district_obj = $("select[name='district']");
        if(province_obj.val()!=0) address+=province_obj.find("option:selected").text();
        if(city_obj.val()!=0)address+=city_obj.find("option:selected").text();
        if(district_obj.val()!=0) address+=district_obj.find("option:selected").text();
    }



    window.open(url+'?address='+address,title,'top='+top+',left='+left+',width='+width+',height='+height)
}

function getCity(){

}

</script>
<script type="text/javascript">
$(document).ready(function(){
    $("#button").click(function(){

      <?php 
      if((request()->controller()=='Article' && request()->action()=='add') || (request()->controller()=='Shop' && request()->action()=='add')){
       ?>

      var images='';
      <?php if(!empty($name)){ ?>
      $(".meiyouuimmag textarea").each(function(ret){
        var img=$(this).data('img');
        if(img){
          img_text=$(this).val();
          if(ret==0){
            images+='"'+img
          }else{
            images+=',"'+img
          }
        }
      });
      if(images){
        images="{"+images+"}";
        $('#images').val(images);
      }else{
        $('#images').val();
      }

      <?php }else{?>
       $(".meiyouuimmag textarea").each(function(ret){
        var img=$(this).data('img');
        if(img){
          img_text=$(this).val();
          if(ret==0){
            images+=''+img
          }else{
            images+=','+img
          }
        }
      });
      if(images){
        $('#images').val(images);
      }else{
        $('#images').val();
      }
        <?php }} 
if(input('?url')){
  echo 'loading("#button button")'."\r\n";
}
 ?>

        ajaxFun("POST","",$(".form-horizontal").serialize(),"json",function(ret){
            if(ret){
                if(ret.ret){
                    swal_msg(ret.ret,'',"success",<?php if(input('?url')){echo input('url');}else{echo 0;} ?>)
                    <?php 
if(input('?url')){
  echo 'loading("#button button",\'<i class="fa fa-check"></i> &nbsp;\'+ret.ret)';
}
 ?>

                    return false;
                }else{
                    layer.msg(ret.err)
                }
            }else{
                swal_msg("错误",ret,"error");
            }
            <?php 
if(input('?url')){
 ?>
loadingClose("#button button",'<i class="fa fa-check"></i> &nbsp;<?php if(isset($name)): ?>修改<?php else: ?>提交<?php endif; ?>')
<?php 
}
 ?>

        });
    });
});

function html2Escape(sHtml) {
 return sHtml.replace(/[<>&"]/g,function(c){return {'<':'&lt;','>':'&gt;','&':'&amp;','"':'&quot;'}[c];});
}
</script>
<style type="text/css">
.tbutton{ 
  position: fixed;
  bottom:0px;
  width: 100%;
  background: #fff;
  padding-top: 20px;
  padding-bottom: 20px;
  border-top: 1px solid #F5EFEF;
  z-index: 99999999999
}
#button{ width:120px; margin: 0 auto;}
.wrapper-content{ margin-bottom:75px;}
</style>

<div class="tbutton">
  <div id="button"><button class="btn btn-w-m btn-primary" type="button"><i class="fa fa-check"></i> &nbsp;<?php if(isset($name)): ?>修改<?php else: ?>提交<?php endif; ?></button></div>
</div>